Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the ckanext template #1956

Merged
merged 8 commits into from Nov 20, 2014
Merged

Improve the ckanext template #1956

merged 8 commits into from Nov 20, 2014

Conversation

seanh
Copy link
Contributor

@seanh seanh commented Oct 3, 2014

Add Travis, Coveralls, PyPI, tests, README, gitignore, LICENSE, etc. to the CKAN extension template that gets rendered when you do paster --plugin=ckan create -t ckanext.

I've been doing all this stuff manually for every new extension so this is going to save me some time, will hopefull encourage the general extension writing community to have good practices as well.

Also changed the template to use Jinja2 everywhere.

Example output:

https://github.com/ckan/ckanext-eurovoc

https://pypi.python.org/pypi/ckanext-eurovoc

(Not sure why the rst isn't rendering on pypi though)

@seanh
Copy link
Contributor Author

seanh commented Oct 3, 2014

By the way this tags the CKAN extension it generates with keyword CKAN on PyPI: https://pypi.python.org/pypi?%3Aaction=search&term=ckan&submit=search (although they're all called ckanext-something anyway)

@seanh
Copy link
Contributor Author

seanh commented Oct 3, 2014

@johnmartin I think you had some ideas about a template for frontend stuff for extensions? That could be added to this, after this is merged.

I think it's good to use the existing template because it's in the core repo, documented in the extension and theming tutorials, and its a proper template with Jinja2 rendering.

@seanh
Copy link
Contributor Author

seanh commented Oct 7, 2014

@joetsoi Can you be sure to test this out for me? Create a test extension, actually publish it to github and pypi, test that travis and coveralls work, test that pip installing it and starting ckan works..

# If there are data files included in your packages that need to be
# installed, specify them here. If using Python 2.6 or less, then these
# have to be included in MANIFEST.in as well.
include_package_data=True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a comma here after True.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, fixing...

@seanh
Copy link
Contributor Author

seanh commented Oct 15, 2014

I've re-tested this and everything seems to work.

One thing I could add is instructions for how to publish the project to GitHub (like it has instructions for how to put it on PyPI). But I don't think it's really necessary so I'm happy for it to be merged as-is

@seanh
Copy link
Contributor Author

seanh commented Oct 21, 2014

Bump. I believe the build is passing on travis

@amercader amercader added this to the CKAN 2.4 milestone Oct 22, 2014
@seanh
Copy link
Contributor Author

seanh commented Oct 22, 2014

Reminder to self, add http://badge.fury.io/ or https://pypip.in/ badges to this

var('license_name', 'License name'),
var('description', 'a one-line description of the extension, '
'for example: "A simple blog extension for CKAN"'),
var('author', 'for example: "Guybrush Threepwood"'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant.

@seanh
Copy link
Contributor Author

seanh commented Oct 30, 2014

@joetsoi ping

@amercader amercader merged commit 3b478e5 into master Nov 20, 2014
@smotornyuk smotornyuk deleted the improve-ckanext-template branch December 19, 2018 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants